package com.wxy.demo.throwable;

/**
 * <p>
 * 异常测试
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2023/1/17 15:26
 */
public class Main {
    public static void main(String[] args) {
        try {
            throw new RuntimeException("这是一个异常");
        } catch (RuntimeException e) {
            e.printStackTrace();
        }
        try {
            throw new NoClassDefFoundError("这是一个错误");
        } catch (NoClassDefFoundError e) {
            e.printStackTrace();
        }
        try {
            throw new Throwable("这是一个可抛出异常");
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }
}
